Domain Name Services
Why use names at all?
Before discussing domain name service, let's just talk about why
hosts on an IP network are named in the first place. Let's say
your company, Acme, has a website that they use for online sales.
Its IP address is 194.120.110.2. This address is not going to
be very easy for customers to remember, and there's no way a customer
could "guess" what the IP address might be. So customers would
need to write down this IP address to do business with the company.
Also, if the network administrator needed to move the machine
to a different LAN, or perhaps move the web services to another,
faster, machine, he'd then need to inform every user of the site
of the new address. All of this is very inconvenient.
Instead, when the Acme company acquired its IP addresses from
InterNIC, they also registered a domain name. So let's say that
they were given the network address of 194.120.110.0 (giving them
node addresses from 1-254 for use within Acme), and they registered
their domain name of "acme.com". They then can give each machine
on their network a host name, and set up a service that will link
each machine's IP address to the host name. So their web server
is at IP address 194.120.110.2, and is given the name "www.acme.com".
When any customer wants to connect to the site, their machine
uses domain name services to resolve "www.acme.com" to an IP address,
then they can connect using the IP address. If the Web Server
software is moved to a different faster machine, the administrator
can either give that new machine the IP address of 194.120.110.2,
or can change the domain name table to reflect the new IP address.
Either way, its invisible to the customers, who really don't care
what network or what machine its on, they just want to connect.
Note that it is not necessary for every machine to have a host
name (although its advisable if your machine will be offering
services to others, such as mail service or ftp), nor is it necessary
to have access to a DNS server in order to connect to an IP host
(you can connect using the IP address instead of a name). DNS
is a convenience, but it is not essential.
What is domain name service?
DNS is a distributed, replicated, data query service, used primarily
to look up host names on a TCP/IP network. DNS has a root domain
("." ) at the top of the domain hierarchy that is served by a
group of servers called the root servers. Under the root domain
are some top-level domains, such as ".com" (commercial enterprises),
".gov" (government agencies); ".net" (network service providers),
".mil" (military services), ".org" (not-for-profit organizations)
and ".edu" (for educational institutions). You'll also see geographical
domains, such as .ca for Canada, .jp for Japan.
Each domain has a domain name server where the names and addresses
within that domain are maintained, and this information is shared
with other domain name servers as needed. Root servers have information
only for the top-level domains, which have information for subdomains
within their domain, and onward down through the hierarchy. Information
is retrieved by tracing pointers from the root domain, through
subordinate domains, to the target domain.
Example of Name Resolution
Let's take a closer look at the dialog that goes on between your
machine and the DNS server when you try to make a connection using
a domain name instead of an IP address. Let's say you're trying
to connect to "www.abc.com" :
- Your computer contacts your DNS server, and tells it, "I need
the IP address for www.abc.com."
- The DNS server says to itself, "I am not the name server for abc.com,
and nobody else has looked up that value lately, so I need to
find out where to get it." The DNS server then sends a query to
one of the main "root servers", which says in essence, "hey, what
other name server hosts the domain abc.com?"
- One of the root servers will respond back to your DNS server,
telling it "OK, the server you want to talk to for abc.com is
at 128.224.4.2".
- Your name server will send a request to 128.224.4.2, asking it,
"What is the IP address for www.abc.com?"
- The server at 128.224.4.2 will respond back to your name server,
telling it "the address for www.abc.com is 128.224.30.19". Your
name server will return this information to you, and will cache
the information for a time specified by the abc.com name server
(the ttl, or time to live), so that if someone else requests the
information within the ttl, it can reply with the information
that it has cached (this will be a non-authoritative response).
- Your web browser will connect to the IP address 128.224.30.19,
showing you the web page at www.abc.com.
All of this happens in the space of a few milliseconds - so fast
that you don't notice a delay between the time you type in a web
page address and when you start loading the page.
|
|
|